package top.huntwolf.admin.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import top.huntwolf.admin.common.enums.BookConditionEnum;
import top.huntwolf.admin.pojo.BookReserve;

import java.util.List;

@Mapper
@Repository
public interface BookReserveDao {

    BookReserve select(BookConditionEnum condition);

    BookReserve selectOne(String isbn);

    BookReserve selectBook(String isbn, BookConditionEnum condition);

    BookReserve selectBookByStore(String isbn , BookConditionEnum condition,Integer storeId);

    int insert(BookReserve bookCondition);

    int replace(BookReserve bookCondition);

    int delete(String isbn);

    int update(BookReserve bookCondition);

    void updateBook(BookReserve bookCondition);

    List<BookReserve> selectAll();

    int addReserve(List<BookReserve> bookConditions);

    int replaceReserve(List<BookReserve> bookConditions);

    int updateList(List<BookReserve> bookReserves);

    int reduceStorage(BookReserve bookReserve);

    int increaseStorage(BookReserve bookReserve);
}
